<template>
  <div>
    <el-table
      :data="exportDatasList"
      style="width: 100%"
    >
      <el-table-column
        label="导出时间"
      >
        <template slot-scope="scope">
          <i class="el-icon-time" />
          <span style="margin-left: 10px">{{ scope.row.exportTime }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="文件名称"
      >
        <template slot-scope="scope">
          <el-popover trigger="hover" placement="top">
            <p>备注名: {{ scope.row.fileName }}</p>
            <p>时间: {{ scope.row.exportTime }}</p>
            <div slot="reference" class="name-wrapper">
              <el-tag size="medium">{{ scope.row.fileName }}</el-tag>
            </div>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column
        label="操作用户"
      >
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.operator }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="danger"
            @click="downLoad(scope.$index, scope.row)"
          >下载</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  export default {
    props: {
      exportDatasList: {}
    },
    data() {
      return {
      }
    },
    methods: {
      downLoad(index, row) {
        var fileName = row.fileName
        this.$download('dataCenter/downloadExportRecords', { fileName }, fileName + '.xls')
      }
    }
  }
</script>
